<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>download_xml_for_game (DataDownloader)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/data_downloader.rb, line 120</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">download_xml_for_game</span>(<span class="ruby-identifier">gid</span>)
    <span class="ruby-identifier">gid_path</span> = <span class="ruby-identifier">get_gid_path</span>(<span class="ruby-identifier">gid</span>)
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/bench.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_bench</span>(<span class="ruby-identifier">gid</span>))    
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/benchO.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_bencho</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/boxscore.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_boxscore</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/emailSource.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_emailsource</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/eventLog.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_eventlog</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/game.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_game_xml</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/game_events.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_game_events</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/gamecenter.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_gamecenter_xml</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/gameday_Syn.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_gamedaysyn</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/linescore.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_linescore</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/miniscoreboard.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_miniscoreboard</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/players.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_players</span>(<span class="ruby-identifier">gid</span>))
    <span class="ruby-identifier">write_file</span>(<span class="ruby-node">&quot;#{gid_path}/plays.xml&quot;</span>, <span class="ruby-constant">GamedayFetcher</span>.<span class="ruby-identifier">fetch_plays</span>(<span class="ruby-identifier">gid</span>))
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>